home *** CD-ROM | disk | FTP | other *** search
- #include <WindowMgr.h>
- #include <MenuMgr.h>
- #include <EventMgr.h>
- #include "Skel defines.h"
- #include "Skel globals.h"
-
- #include <EventMgr.h>
-
- /*
-
- Update the contents of the given window
- ############################ UpdateWindow ##########################
-
- This is our response to receipt of an update event for myWindow.
- Since the window is likely to be inactive, the current GrafPort
- will be elsewhere. We must change it for drawing, yet leave it
- as it was.
- */
-
- updatewindow (awindow)
- WindowPtr awindow;
- {
- GrafPtr saveport; /* to save and restore the old port */
-
- BeginUpdate (awindow); /* reset clipRgn etc to only redraw what's
- necessary. */
-
- GetPort (&saveport); /* don't trash the port; we might be
- updating an inactive window */
- SetPort (awindow); /* work in the specified window */
-
- drawwindow (); /* redraw contents of window */
-
- SetPort (saveport); /* all nice and tidy as before */
-
- EndUpdate (awindow);
-
- } /* UpdateWindow */
-
-